<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>自动代扣变更记录</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
    <script type="text/javascript">
        var grid = null;
        var callback = function () {
            grid.reload();
        };
        var addGSData_s = {};
        $(function () {
            $("#searchBar").ligerForm();
            $("#ligergrid1").ligerGrid({
                url: '<%=path%>/custpay/cmmOlAutoCharRec/initList.do',
                method : 'get',
                parms:getSearchParams(),
                columns: [
                    { display: '客户名称', name: 'clientName', width: 100, align: 'center', enabledSort:true},
                    { display: '登录手机号', name: 'clientPhone', width: 150, align: 'center', enabledSort:true},
                    { display: '银行卡号', name: 'accNo', width: 150, align: 'center', enabledSort:true},
                    { display: '银行编码', name: 'bkCd', width: 80, align: 'center', enabledSort:true},
                    { display: '银行名称', name: 'accOrgNm', width: 150, align: 'center', enabledSort:true},
                    { display: '操作平台', name: 'platformCdNm', width: 100, align: 'center', enabledSort:true},
                    { display: '自动代扣状态', name: 'isAutoNm', width: 150, align: 'center', enabledSort:true},
                    {display: '操作人', name: 'crtNm', align: 'center', width: 150,enabledSort:true},
                    {display: '创建时间', name: 'crtTm', align: 'left', width: 150, render: renderDate}
                ],
                pageSize: 10,
                root: 'rows',
                record: 'total',
                hideLoadButton: true,
                width: '100%',
                height: '100%',
                heightDiff: -2,
                checkbox: false,
                rownumbers: true,
                allowUnSelectRow: true,
                alternatingRow: false,
                onBeforeShowData: function () {
                    var grid = this;
                    grid.collapsedRows = [];
                }
            });
            grid = liger.get("ligergrid1");

            $("#searchBtn").click(function(event) {
                var form = new liger.get("searchBar");
                var data = form.getData();
                console.log(data);
                for (name in data){
                    grid.setParm(name,data[name]);
                };
                grid.reload();
            });
            $("#clearBtn").click(function(event) {
                clearLigerForm("searchBar");
            });
            $("#dateform").ligerForm();
        });

        //查询参数
        function getSearchParams(){
            var form = new liger.get("searchBar");
            var data = form.getData();
            return data;
        }
        //格式化时间
        function renderDate(rowdata, index, value) {
            var dateStr = "";
            if (null != value) {
                var date = new Date(value);
                dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
            }
            return dateStr;
        }



    </script>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div class="searchArea">
        <form id="searchBar">
            <div class="fieldset1 clearFix">
                <div class="fieldBox">
                    <div class="label">客户名称</div>
                    <div class="field">
                        <input name="clientName" id="clientName" type="text" class="ui-textbox" value="">
                    </div>
                </div>

                <div class="fieldBox">
                    <div class="label">登录手机号</div>
                    <div class="field">
                        <input name="clientPhone" id="clientPhone" type="text" class="ui-textbox" value="">
                    </div>
                </div>

                <div class="fieldBox">
                    <div class="label">银行卡号</div>
                    <div class="field">
                        <input name="accNo" id="accNo" type="text" class="ui-textbox" value="">
                    </div>
                </div>

                <div class="clearFix"></div>
                <div class="btnsBox formBtns notRight">
                    <span id="searchBtn" class="sq-button-round"><i class="sqBtnIco_1"></i>查询</span>
                    <span id="clearBtn" class="sq-button-round"><i class="sqBtnIco_19"></i>清空</span>
                </div>

            </div>
        </form>
    </div>
</div>
<div id="ligergrid1" class="sq-grid"></div>
</body>
</html>
